package com.baidu.ueditor;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author zhangshuw
 * <p>     2018/7/18
 */
@RestController
@Slf4j
public class UeditorController {

    @RequestMapping("ueditor/controller.jsp")
    public String action(HttpServletRequest request){
        String rootPath = request.getSession().getServletContext().getRealPath("/");
        if (log.isDebugEnabled()) {
            log.debug("rootPath:{}", rootPath);
        }
        //图片保存路径
        return new ActionEnter(request, rootPath).exec();
    }
}
